package javacafe.action.vote;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javacafe.action.Action;
import javacafe.action.ActionForward;
import javacafe.dto.vote.VoteDTO;
import javacafe.serviceimple.VoteServiceImple;

public class VoteFormAction implements Action {
	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward actfoward = new ActionForward();
		
		VoteServiceImple service = VoteServiceImple.getInstance();
		List<VoteDTO> list = null;
		
		list = service.getVoteList();
		
		request.setAttribute("list",list);
		
		actfoward.setUrl("votelistform");
		return actfoward;
	}
}
